﻿using System.Web.Mvc;

namespace DocumentTrackingSystem.Areas.admin
{
    public class adminAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "admin";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute("index", "admin/home", new { action = "Index", controller = "Home", id = UrlParameter.Optional });
            context.MapRoute("offices", "admin/offices", new { action = "Index", controller = "Office", id = UrlParameter.Optional });
            context.MapRoute("office-edit", "admin/office-edit/{id}", new { action = "EditOffice", controller = "Office", id = UrlParameter.Optional });
            context.MapRoute("office-create", "admin/office-create", new { action = "CreateOffice", controller = "Office", id = UrlParameter.Optional });
          
            //context.MapRoute(
            //    "admin_default",
            //    "admin/{controller}/{action}/{id}",
            //    new { action = "Index", controller="Home", id = UrlParameter.Optional }
            //);
        }
    }
}
